package com.shensi.api.admin.client.market;

import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.market.dto.MarkertPlanDto;
import com.shensi.common.core.annotation.Log;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.enums.BusinessType;
import com.shensi.common.core.page.TableDataInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = SysLogininforClientFallBack.class)
@Component
public interface MarkertPlanClient {
    /**
     * 查询营销方案列表
     */
    @GetMapping("/market/plan/list")
    public TableDataInfo list(@SpringQueryMap MarkertPlanDto markertPlan);

    /**
     * 导出营销方案列表
     */
    @GetMapping("/market/plan/export")
    public AjaxResult export(@SpringQueryMap MarkertPlanDto markertPlan);

    /**
     * 获取营销方案详细信息
     */
    @GetMapping(value = "/market/plan/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id);

    /**
     * 新增营销方案
     */
    @PostMapping("/market/plan")
    public AjaxResult add(@RequestBody MarkertPlanDto markertPlan);

    /**
     * 修改营销方案
     */
    @PutMapping("/market/plan")
    public AjaxResult edit(@RequestBody MarkertPlanDto markertPlan);

    /**
     * 新增阶梯营销方案
     */
    @PostMapping("/market/plan/updateMartketPlan")
    public AjaxResult updateMartketPlan(@RequestBody MarkertPlanDto markertPlan);

    /**
     * 删除营销方案
     */
    @DeleteMapping("/market/plan/{ids}")
    public AjaxResult remove(@PathVariable("ids")  Long ids);

    /**
     * 新增阶梯营销方案
     */
    @PostMapping("/market/plan/addMarketPlanInfo")
    public AjaxResult addMarketPlanInfo(@RequestBody MarkertPlanDto markertPlan);

    /**
     * 删除营销方案
     */
    @PostMapping("/market/plan/deleteMarketPlan")
    public AjaxResult deleteMarketPlan(@RequestBody MarkertPlanDto markertPlan);

}
